Some railroad guides and expensive bibles have so called thumb-indexes, i.e. there are marks on the sides of the pages that indicate where the chapters are. You can create these by printing black blobs in the margin of the pages. The vertical position should be determined by the chapter number or some other counter. As the position is independent of the contents of the page, we print these blobs as part of the header in a zero-sized picture as described in the previous section.
Of course we have to take care of two-sided printing, and we may want to
have an index page with all the blobs in the correct position. The solution
requires some hand-tuning to get the blobs nicely spaced out vertically.
For the application that I had there were 12 sections, so I made the blobs
18 mm apart, i.e. 9 mm blob separated by 9 mm whitespace. In order to avoid
calculations they are set in a picture environment with the
\unitlength
set to 18 mm. Page numbers are set in the headers at the
outer sides, and the blobs are attached to these. In this example the
section numbers are used to position the blobs, but you can replace this
with any numeric value. See figure for the resulting
overview page and figure for the code.